<div class="st-cp-pg-detalhe">
     <div id="agendamento">
        <div class="fechada">
            <a href="javascript:void(0);">agende sua avaliacao &nbsp;&nbsp;&nbsp;<img src="<?php echo $this->urlbase.'/public/media/images/icone_seta.png'?>" alt="<?php echo $this->titulo; ?>"/></a>
        </div>
        
        <div id="blc_aberta">
            <div class="aberta">
                <form id="form" method="post">
                    <label>nome</label><input type="text" id="nome" name="nome" />
                    <label>telefone</label><input class="telefone" type="text" id="" name="telefone" />
                    <label>e-mail</label><input type="text" id="email" name="email" />
                    <label>cidade</label><input type="text" id="cidade" name="cidade" />
                    <label>queixa</label>
                    <select id="queixa"   name="queixa">
                        <?php foreach($this->queixa as $queixa) { ?>
                        <option value="<?php echo  $queixa['QEX_NOM'];?>"><?php echo  $queixa['QEX_NOM'];?></option>
                        <?php } ?>
                    </select>
                    <input width="50px"type="submit" id="enviar" name="enviar" value="enviar" />
                </form>
            </div>
        </div>
    </div>  

    <div class="cnt-slider">
        <?php foreach($this->galeria as $kgl => $gal) {
            
            $nom_img = explode('.', $gal['GAL_IDIMG']);
            $nom_img = $nom_img[0];
            
            $imgs = glob('public/upload/procedimento/'.$nom_img.'.*');
            
            foreach($imgs as $key => $img) $img = $img;  
            $img = str_replace ('_tb', '', $img);
            $img = str_replace ('_g_', '_m_', $img); //
            
            $style = $kgl > 0 ? 'style="display: none;"':'';
        ?>
        <img class="colImg <?php echo $kgl; ?>" <?php echo $style; ?> src="<?php echo $this->urlbase . '/'. $img; ?>" alt="<?php echo $this->titulo; ?>"/>
        <?php } ?>
    </div>
    
    <div class="colcontent">
        <div class="titulo">
            <h2><?php echo $this->row['PRC_NOM']; ?></h2>  
        </div>
        <div class="descricao">
            <?php echo $this->row['PRC_TXT'] ?>
        </div>
        <div class="caracteristicas">
            <table>
            <?php
                $count = 0;
                foreach ($this->result['item'] as $row){ ?>
                <?php 
                   if($count == 0) {
                        echo '<tr>'; 
                   }
                   
                   $count++;
                ?>
                <td class="col">
                    <div class="itemcaract">
                        <img src="<?php echo $this->urlbase . '/public/media/images/' . $row['NOME'] . '.png' ?>" alt="<?php echo $row['TITULO']; ?>">
                        <div class="caracInfo">
                            <div class="titcaract"><?php echo $row['TITULO']; ?></div>
                            <div class="desccaract"><?php echo $row['DESCRICAO']; ?></div>
                        </div>
                    </div>
                </td>
                <?php 
                   if($count == 2){
                       echo '</tr>'; 
                       $count = 0;
                   }
                ?>
                <?php } ?>
                
                <?php 
                   if($count == 1){
                       echo '<td class="col"></td></tr>'; 
                   }
                ?>
            </table>
        </div>
    </div>
    <div class="menu-footer">
        <?php /*
        <table width="100%">
            <tr>
                <?php foreach($this->procs as $proc){ ?>
                    <td><a href="<?php echo $this->urlbase.'/procedimentos/detalhe/id/'.$proc['PRC_ID'] ?>"><?php echo $proc['PRC_NOM']?></a></td>
                <?php } ?>               
            </tr>
        </table>
         */ ?>
        <ul>
            <?php foreach($this->procs as $proc){ ?>
                <li><a href="<?php echo $this->urlbase.'/procedimentos/detalhe/id/'.$proc['PRC_ID'] ?>"><?php echo $proc['PRC_NOM']?></a></li>
            <?php } ?>   
        </ul>
    </div>  
</div>

<script src="<?php echo $this->urlbase;?>/public/media/js/jquery.cycle.all.min.js?1=1" type="text/javascript"></script>
<script>
$(document).ready(function() {  
    setTimeout(function(){
        $('.cnt-slider').cycle({  timeout: 4000 });
    }, 1000);
});
</script>

<script src="<?php echo $this->urlbase;?>/public/media/js/jquery.jcarousel.min.js" type="text/javascript"></script>
<script>
$(document).ready(function() {  
    $('.menu-footer').jcarousel({
        scroll: 2,
        visible: 6,
        animation: 1000,
        auto: 6,
        size: 13,
        wrap: 'circular',
        itemFallbackDimension: 100
    });
    /*
    setTimeout(function(){
        $(".colImg").each(function(index) {
            var aux = $(this).attr('src');
            if(screen.width <= 1366){ //$(window).width()
                $(this).prop('src', aux.replace('_f_','_m_'));
                $('.cnt-slider').css('max-height','500px !important'); // 538px
                var height = $('.cnt-slider').height() + 20;
                if(height < 50) height = 500;
                $(".colImg").css('height',height+'px');
            }
            else{
                $(this).prop('src', aux.replace('_m_','_f_'));
                $('.cnt-slider').css('max-height','812px !important'); // 865px
                var height = $('.cnt-slider').height() + 20;
                if(height < 50) height = 812;
                $(".colImg").css('height',height+'px');
            }   
        });
    }, 1000);
    */
});
</script>
